﻿using System;

namespace Factory
{
    public class ClusteringFactory
    {
        public static IClusteringAlgorithm CreateClustering(string algorithmType)
        {
            switch (algorithmType.ToLower())
            {
                case "kmeans":
                    return new KmeansClustering();
                case "dbscan":
                    return new DbscanClustering();
                case "hierarchical":
                    return new HierarchicalClustering();
                default:
                    throw new ArgumentException("不支持的聚类算法类型");
            }
        }
    }
}